//
//  TT_macroConfig.h
//  ZKGX
//
//  Created by 王洋 on 2020/3/17.
//  Copyright © 2020 王洋. All rights reserved.
//

#ifndef TT_macroConfig_h
#define TT_macroConfig_h

#pragma mark -------- TOOL --------

#if DEBUG
#define NSLog(FORMAT, ...) fprintf(stderr,"------ %s ------ %d 行 ------ %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
#define NSLog(FORMAT, ...) nil
#endif


#define APP_VERSION                 [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]

#define APP_BUILD                 [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]

#define WEAKSELF __weak typeof(self) weakSelf = self;

#pragma mark -------- SIZE --------
#define  TTScreenWidth      [UIScreen mainScreen].bounds.size.width
#define  TTScreenHeight     [UIScreen mainScreen].bounds.size.height

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0)

#define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0)
#define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0)
#define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0)
#define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0)
#define IS_IPHONE_X  kIs_iPhoneX
//判断设备版本
#define IOS7 ([[UIDevice currentDevice].systemVersion floatValue]>=7.0&&[[UIDevice currentDevice].systemVersion floatValue]<8.0)
#define IOS8 ([[UIDevice currentDevice].systemVersion floatValue]>=8.0)
#define IOS9 ([[UIDevice currentDevice].systemVersion floatValue]>=9.0)
#define IOS10 ([[UIDevice currentDevice].systemVersion floatValue]>=10.0)
#define IOS11 ([[UIDevice currentDevice].systemVersion floatValue]>=11.0)
#define IOS12 ([[UIDevice currentDevice].systemVersion floatValue]>=12.0)
#define IOS13 ([[UIDevice currentDevice].systemVersion floatValue]>=13.0)
#define IOS14 ([[UIDevice currentDevice].systemVersion floatValue]>=14.0)
#define IOS15 ([[UIDevice currentDevice].systemVersion floatValue]>=15.0)


#define kIs_iphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define kIs_iPhoneX TTScreenWidth >=375.0f && TTScreenHeight >=812.0f&& kIs_iphone

#define ADAPTER_WIDTH [UIScreen mainScreen].bounds.size.width/375
#define ADAPTER_HEIGHT [UIScreen mainScreen].bounds.size.height/667

/*状态栏高度*/
//#define kStatusBarHeight (CGFloat)(kIs_iPhoneX?(44.0):(20.0))
#define kStatusBarHeight AppScreenUtils.statusBarHeight
/*导航栏高度*/
#define kNavBarHeight (44)
/*状态栏和导航栏总高度*/
#define kNavBarAndStatusBarHeight (CGFloat)(kIs_iPhoneX?(88.0):(64.0))
/*TabBar高度*/
#define kTabBarHeight (CGFloat)(kIs_iPhoneX?(49.0 + 34.0):(49.0))
/*顶部安全区域远离高度*/
#define kTopBarSafeHeight (CGFloat)(kIs_iPhoneX?(44.0):(0))
/*底部安全区域远离高度*/
#define kBottomSafeHeight (CGFloat)(kIs_iPhoneX?(34.0):(0))
/*iPhoneX的状态栏高度差值*/
#define kTopBarDifHeight (CGFloat)(kIs_iPhoneX?(24.0):(0))
/*导航条和Tabbar总高度*/
#define kNavAndTabHeight (kNavBarAndStatusBarHeight + kTabBarHeight)



#define ProductCategoryViewWidth    300



#pragma mark -------- COLOR --------
#pragma mark --- theme --- color ---
#define default_color_theme_blue            UIColorLightAndDarkHex(0x207ffb,0xFFFFFF)


#pragma mark --- normal --- color ---
#define default_color_blue            UIColorLightAndDarkHex(0x207ffb,0xFFFFFF)
#define default_color_white           UIColorLightAndDarkHex(0xFFFFFF,0x000000)
#define default_color_black           UIColorLightAndDarkHex(0x000000,0xFFFFFF)


#pragma mark  --- bgcolor ---
#define default_color_naviBg_gray       UIColorLightAndDarkHex(0xf1f1f1,0x555555)
#define default_color_segmentBg_gray    UIColorLightAndDarkHex(0xf1f1f1,0x555555)
#define default_color_tableViewBg_gray  UIColorLightAndDarkHex(0xf1f1f1,0x555555)

#define default_color_bg_gray                UIColorLightAndDarkHex(0xf1f1f1,0x666666)
#define default_color_cellbg_gray            UIColorLightAndDarkHex(0xf6f6f6,0x555555)
#define default_color_cellbg_lightGray       UIColorLightAndDarkHex(0xfcfcfc,0x777777)

#define default_color_cellBtnBg_gray         UIColorLightAndDarkHex(0xCCCCCC,0x111111)

#define default_color_btnbg_gray             UIColorLightAndDarkHex(0xf3f3f3,0x525252)

#pragma mark  --- labelcolor ---
#define default_color_cellTitleLabel_gray          UIColorLightAndDarkHex(0x000000,0xFFFFFF)
#define default_color_cellContentLabel_gray        UIColorLightAndDarkHex(0x222222,0xEEEEEE)
#define default_color_cellContentLabel_blue        UIColorLightAndDarkHex(0x207ffb,0xCCCCCC)


#define default_color_naviTitle_gray               UIColorLightAndDarkHex(0x333333,0x666666)
#define default_color_btnTitle_gray                UIColorLightAndDarkHex(0x333333,0x666666)

#define default_norColor_segmentTitle               UIColorLightAndDarkHex(0x333333,0xFFFFFF)
#define default_selColor_segmentTitle               UIColorLightAndDarkHex(0x207ffb,0x207ffb)

#define COLOR_MAIN_FROEGROUND UIColor.whiteColor
//[UIColor colorWithRed:172./255 green:145./255 blue:100./255 alpha:1.0f]//背景色
#define COLOR_THEME_HIGHLIGHT [UIColor colorWithRed:172./255 green:145./255 blue:100./255 alpha:1.0f]//背景色

#pragma mark  -------- BUSINESS CONFIG --------

//特殊的分类Id 不少业务需要根据这个来判断

//婚车
#define Store_Category_Car              @"9"
#define Store_Category_Car_int          9

//酒店
#define Store_Category_Hotel              @"12"
#define Store_Category_Hotel_int          12

//司仪
#define Store_Category_siyi               @"13"
//摄像
#define Store_Category_shexiang           @"16"
//摄影
#define Store_Category_sheying            @"15"
//跟妆
#define Store_Category_genzhuang          @"14"

//婚戒手势
#define Store_Category_hunjie             @"18"

#pragma mark  -------- CONFIG --------

//  OSS图片上传
#define OSS_AccessKeyId                 @"LTAI4FkgDZdGTnrNiAJvGQAs"
#define OSS_AccessKeySecret             @"7iGezYFcoxRZNX7FhWgWlZmABkFVNd"

#define OSS_ENDPOINT                    @"http://oss-cn-hangzhou.aliyuncs.com"
#define OSSBUCKET_NAME                  @"pdl-ossrw201909"

#define OSS_IMAGE_PREFIX                @"http://zkgxoss.oss-cn-hangzhou.aliyuncs.com/"


//  极光开发者网站中申请App时，注册的AppId、AppSecret、AppKey

#ifdef DEBUG
#define IM_CERTIFICATE_ID             22331
#else
#define IM_CERTIFICATE_ID             22330
#endif

#pragma mark  -------- BUSINESS SOURCE --------

//信息收集-婚戒定制
#define B_INFO_COLLECT_HJDZ             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/hunjiedingzhi.png"
//信息收集-四大金刚
#define B_INFO_COLLECT_SDJG             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/sidajingang.png"
//信息收集-预定酒店
#define B_INFO_COLLECT_YDJD             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/yudingjiudian.png"
//信息收集-婚礼策划
#define B_INFO_COLLECT_HLCH             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/hunlicehua.png"
//信息收集-婚纱摄影
#define B_INFO_COLLECT_HSSY             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/hunshasheying.png"
//信息收集-婚纱礼服
#define B_INFO_COLLECT_HSLF             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/hunshalifu.png"
//信息收集-男士礼服
#define B_INFO_COLLECT_NSLF             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/nanshilifu.png"
//信息收集-男士礼服
#define B_INFO_COLLECT_HCYD             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/huncheyuding.png"
//信息收集-喜糖预定
#define B_INFO_COLLECT_XTDZ             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/gather/xitangdingzhi.png"

//0元免单首页弹窗
#define B_FREENEW_HOME_AD               @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/wang/zerogou.png"
//0元免单头部
#define B_FREENEW_HEAD_BG               @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/wang/freeNewBg.png"
//0元购分享
#define B_FREENEW_SHARE_IMG             @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/apk/new_person_share.jpg"

//主题贴吧第一个背景图
#define B_THEMEPOST_INDEX_TAG           @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/wang/zhutitieba.png"

//我的页面-用户推荐banner
#define B_MINE_BANNER_REC               @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/file/Myentrance/banner/png.png"

//我的页面-婚礼管家
#define B_MINE_GUANJIA_BG               @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/wang/hunliguanjia.png"


//平台服务详情
#define B_PLATFORM_SERVICE_DETAIL       @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/wang/pingtaifuwu.png?x-oss-process=image/format,webp"

//海报三张图
#define B_POSTER_IMG1      @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/file/post/page/1.png"
#define B_POSTER_IMG2      @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/file/post/page/2.png"
#define B_POSTER_IMG3      @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/file/post/page/3.png"

//推荐官介绍图
#define AgentIntroduceImageUrl1  @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/file/Recommender/introduce/1.png"
#define AgentIntroduceImageUrl2  @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/file/Recommender/introduce/2.png"
#define AgentIntroduceImageUrl3  @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/file/Recommender/introduce/3.png"

//菜单背景图
#define B_MENU_BG            @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/wang/v2menu.png"

//权益详情
#define B_QUANYI_DETAIL      @"https://fanshafuoss.oss-cn-beijing.aliyuncs.com/wang/pingtaiquanyidetail.png"
//用户注册协议
#define kUserPdf @"UserRegisterAgreement.pdf"
//隐私政策
#define kSecretPdf @"PrivacyPolicy.pdf"
//商家注册协议
#define kMarryBackEndPdf @"BussinessRegisterAgreement.pdf"
//婚前婚后服务协议
#define kServicePdf @"ServiceAgreement.pdf"
//意外伤害保险条款
#define kInsurePdf @"InsuranceClauses.pdf"
//中国人民财产保险股份有限公司公众责任保险条款
#define kInsure2Pdf @"PICCInsuranceTerms.pdf"
//注销协议
#define kCancelAgreement @"CancelAgreement.pdf"

typedef NS_ENUM(NSInteger, CouponType) {

    //平台全场
    CouponType_all          = 1,
    //行业券
    CouponType_industry     = 2,
    //联盟券
    CouponType_union        = 3,
    //新人专享券
    CouponType_userNew      = 47,
    //商家全场
    CouponType_storeAll     = 25,
    //商家单品
    CouponType_storeProduct = 26
};

typedef NS_ENUM(NSInteger, CouponSubmitType) {

    //使用新人免单券
    CouponSubmitType_userNew          = -4,
};

typedef NS_ENUM(NSInteger, CouponUseType) {
    //无
    CouponUseType_none,
    //平台津贴
    CouponUseType_platform =1,
    //优惠券
    CouponUseType_store =2,
};


//状态（1：已申请，2：商家同意，3：商家拒绝，4：平台同意，5：平台拒绝，6：退款中，7：退款成功，8：退款失败）
typedef NS_ENUM(NSInteger, RefundStatusType) {
    //无
    RefundStatusType_applyed          =1,
    //平台津贴
    RefundStatusType_storeSure        =2,
    //优惠券
    RefundStatusType_storeRef         =3,
    
    RefundStatusType_platformSure     =4,

    RefundStatusType_platformRef      =5,

    RefundStatusType_refundIng        =6,

    RefundStatusType_refunded         =7,

    RefundStatusType_refundFail       =8,

};

typedef NS_ENUM(unsigned long, FieldOrderType) {
    //全部
    FieldOrderType_All           = 0,
    //待支付
    FieldOrderType_WaitPay       = 1,
    //待评价
    FieldOrderType_WaitEvaluate  = 4,
};


typedef NS_ENUM(unsigned long, SerOrderType) {
    //全部
    SerOrderType_All           = 0,
    //待支付
    SerOrderType_WaitPay       = 1,
    //待接单
    SerOrderType_WaitRec       = 2,
    //待服务
    SerOrderType_WaitService   = 3,
    //待评价
    SerOrderType_WaitEvaluate  = 4,
};



typedef NS_ENUM(unsigned long, SerCellOrderActionType) {
    //取消
    SerCellOrderActionType_cancle,
    //支付所有
    SerCellOrderActionType_payAll,
    //支付定金
    SerCellOrderActionType_payDJ,
    //支付尾款
    SerCellOrderActionType_payWK,
    //确认服务
    SerCellOrderActionType_servicePass,
    //待评价
    SerCellOrderActionType_evaluate,
    //删除
    SerCellOrderActionType_delete,
};

typedef NS_ENUM(unsigned long, SerCellOrderType) {
    
    //待付定金
    SerCellOrderType_payDJ        =1,
    //待付款
    SerCellOrderType_waitPay      =2,
    //待接单
    SerCellOrderType_recOrder     =3,
    //待付尾款
    SerCellOrderType_payWK        =4,
    //待服务
    SerCellOrderType_service      =5,
    //已服务
    SerCellOrderType_serviced     =6,
    //待确认服务
    SerCellOrderType_serviceSure  =7,
    //待评价
    SerCellOrderType_evaluate     =8,
    //已完成
    SerCellOrderType_finish       =9,
    //用户取消
    SerCellOrderType_cancle       =10,
    //系统取消
    SerCellOrderType_sysClose     =11
};

typedef NS_ENUM(unsigned long, ProCellOrderType) {
    //待付款
    ProCellOrderType_waitPay  =1,
    //待发货
    ProCellOrderType_send     =2,
    //待收货
    ProCellOrderType_receive  =3,
    //待评价
    ProCellOrderType_evaluate =4,
    //已完成
    ProCellOrderType_finish   =5,
    //用户取消支付
    ProCellOrderType_cancle   =6,
    //系统自动关闭
    ProCellOrderType_close    =7
};

typedef NS_ENUM(unsigned long, FieldCellOrderType) {
    //待付款
    FieldCellOrderType_waitPay    =2,
    //待评价
    FieldCellOrderType_evaluate   =8,
    //已完成
    FieldCellOrderType_finish     =9,
    //用户取消支付
    FieldCellOrderType_cancle     =10,
    
    FieldCellOrderType_sysClose   =11
};

typedef NS_ENUM(unsigned long, ProCellOrderActionType) {
    //取消
    ProCellOrderActionType_cancle,
    //支付所有
    ProCellOrderActionType_pay,
    //确认收货
    ProCellOrderActionType_sureRec,
    //查看物流
    ProCellOrderActionType_viewLogistics,
    //待评价
    ProCellOrderActionType_evaluate,
    //删除
    ProCellOrderActionType_delete,
};

typedef NS_ENUM(NSInteger, MyTrajectoryListType) {
    //套餐
    MyTrajectoryListType_package    =2,
    //婚品
    MyTrajectoryListType_product    =4,
    //商家
    MyTrajectoryListType_case       =3,

};

typedef NS_ENUM(NSInteger, IM_TIMCustomMsgType) {
    //套餐
    IM_TIMCustomMsgType_package      =1,
    //婚品
    IM_TIMCustomMsgType_case         =2,
    //商家
    IM_TIMCustomMsgType_coupon       =3,
    
    IM_TIMCustomMsgType_store        =4,
    //订单
    IM_TIMCustomMsgType_order        =5,
    //咨询礼到店礼
    IM_TIMCustomMsgType_guest        =6,

};

typedef NS_ENUM(NSInteger, SelPayMethodType) {
    //微信
    SelPayMethodType_wechat,
    //支付宝
    SelPayMethodType_alipay,
};

//互动级别  帖子   用户回帖    用户回我
typedef NS_ENUM(NSInteger, DetailreplyType) {
    //回复帖子
    DetailreplyType_post,
    //回复用户回帖
    DetailreplyType_user,
    //回复用户回复
    DetailreplyType_replayUser
};

//互动行为 评论、点赞、分享
typedef NS_ENUM(NSInteger, CommunityActionType) {
    //
    CommunityActionType_Eva,
    //
    CommunityActionType_Thumb,
    
    CommunityActionType_Share,
    
    CommunityActionType_Report,
};

typedef NS_ENUM(NSInteger, CommunityInteractionListType) {
    //评论
    CommunityInteractionListType_eva,
    //点赞
    CommunityInteractionListType_thumb
};

#endif /* TT_macroConfig_h */
